package com.jingdianjichi.subject.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
    * ClassName :IsDeletedFlagEnum
    * Package :com.jingdianjichi.subject.common.enums
    * Desciption :
    *@Author :
    *@Create : 15:02
    *@Version :1.0
 *
 */
@AllArgsConstructor
@Getter
public enum SubjectInfoTypeEnum {

    RADID(1, "单选"),
    MULTIPLE(2, "多选"),
    JUDGE(3, "判断"),
    BRIEF(4, "简答");

    private Integer code;
    private String desc;


    public static SubjectInfoTypeEnum getByCode(int codeVal) {
        for (SubjectInfoTypeEnum resultCodeEnum : SubjectInfoTypeEnum.values()) {
            if (resultCodeEnum.code == codeVal) {
                return resultCodeEnum;
            }
        }
        return null;
    }
}
